import request from '../../../utils/request'

export function questionLevelPaginationListApi(page_size, current_page) {
  /**
   * 指定分页信息查询问题难度信息列表接口
  */
  return request({
    url: '/api/resources/question-level/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}

export function questionLevelSearchPaginationListApi(page_size, current_page, search_data) {
  /**
   * 指定查询内容获取问题难度信息接口——包含分页信息
  */
  return request({
    url: '/api/resources/question-level/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_data,
    method: 'GET',
  })
}

export function questionLevelSearchApi(search_data) {
  /**
   * 指定查询内容获取问题难度信息接口
  */
  return request({
    url: '/api/resources/question-level/?search_data=' + search_data,
    method: 'GET',
  })
}

export function questionLevelListApi() {
  /**
   * 问题难度信息列表接口
  */
  return request({
    url: '/api/resources/question-level/',
    method: 'GET',
  })
}

export function questionLevelCreateApi(data) {
  /**
   * 问题难度信息创建接口
  */
  return request({
    url: '/api/resources/question-level/',
    method: 'POST',
    data: data,
  })
}


export function questionLevelDeleteApi (data) {
  /**
   * 问题难度信息删除接口
  */
  return request({
    url: '/api/resources/question-level/' + data['level'] + '/',
    method: 'DELETE',
  })
}

export function questionLevelUpdateApi (data) {
  /**
   * 问题难度信息更新接口
  */
  return request({
    url: '/api/resources/question-level/' + data['level'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function questionLevelDetailApi (data) {
  /**
   * 单个问题难度信息接口
  */
  return request({
    url: '/api/resources/question-level/' + data['level'] + '/',
    method: 'GET',
  })
}
